package cc.miwuya.property.service.impl;

import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cc.miwuya.property.domain.CommonLight;
import cc.miwuya.property.service.CommonLightService;
import cc.miwuya.property.mapper.CommonLightMapper;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
* @author 杩烽浘妫灄
* @description 针对表【common_light(公共照明)】的数据库操作Service实现
* @createDate 2024-02-22 19:49:08
*/
@Service
public class CommonLightServiceImpl extends ServiceImpl<CommonLightMapper, CommonLight>
    implements CommonLightService{
    @Resource
    CommonLightMapper commonLightMapper;
    @Override
    public Object getPage(Page page, Long residentialId) {
        Page<CommonLight> commonLightPage = null;
        commonLightPage = page(page,new QueryWrapper<CommonLight>().eq("residential_id",residentialId));
        return commonLightPage;
    }

    @Override
    public Object getCommonLightTime() {
        List<Object> commonLightTime = commonLightMapper.getCommonLightTime();
        return commonLightTime;
    }
}




